package com.board.servlceimple;

import java.util.List;

import com.board.dao.BoardRepManager;
import com.board.daoimp.BoardRepManagerImp;
import com.board.dto.BoardRepDto;
import com.board.servlce.BoardRepService;

public class BoardRepServiceImp implements BoardRepService {
	
	private static BoardRepServiceImp service;
	private BoardRepManager manager;
	
	private BoardRepServiceImp() {
		manager=new BoardRepManagerImp();
	}
	
	public static BoardRepServiceImp getInstance(){
		if(service==null){
			service=new BoardRepServiceImp();
		}
		return service;
	}

	@Override
	public int deleteBoard(int seq) {
		// TODO Auto-generated method stub
		return manager.deleteBoard(seq);
	}

	@Override
	public int deleteBoards(int[] seq) {
		// TODO Auto-generated method stub
		return manager.deleteBoards(seq);
	}

	@Override
	public List<BoardRepDto> getAllBoards() {
		// TODO Auto-generated method stub
		return manager.getAllBoards();
	}

	@Override
	public List<BoardRepDto> getAllDeleteBoards() {
		// TODO Auto-generated method stub
		return manager.getAllDeleteBoards();
	}

	@Override
	public BoardRepDto getBoard(int seq) {
		// TODO Auto-generated method stub
		return manager.getBoard(seq);
	}

	@Override
	public int replyBoard(BoardRepDto bDto) {
		// TODO Auto-generated method stub
		return manager.replyBoard(bDto);
	}

	@Override
	public int updateBoard(BoardRepDto dto) {
		// TODO Auto-generated method stub
		return manager.updateBoard(dto);
	}

	@Override
	public int writeBoard(BoardRepDto dto) {
		// TODO Auto-generated method stub
		return manager.writeBoard(dto);
	}

}
